package demo6;

import org.springframework.stereotype.Component;
import javax.annotation.Resource;

@Component
public class Person {
    //@Resource//JAVA提供的注解
    //@Resource(name = "sweater")//装配毛衣
    //@Resource(name = "shirt")
    //private Clothes clothes;
    @Resource(name = "shirt")
    private Clothes clothes;
    @Override
    public String toString() {
        return "Person{" +
                "clothes=" + clothes +
                '}';
    }
}
